// 一.表单
.ant-form {
    padding: 0 !important;
}

.ant-form-inline {
    .ant-row {
        width: 100%;
        margin: 0 !important;
    }

    .ant-form-item {
        width: 100%;
        display: flex !important;
        margin-bottom: 12px !important;

        &-control {
            overflow: hidden; // 防止select值太长，破坏布局结构
            line-height: 32px;
        }

        &-control-wrapper {
            flex: 1;
            color: @body-font-color;
        }

        // 左侧label
        &-label {
            min-width: 110px;

            & > label {
                color: @caption-font-color !important;
            }
        }

        .ant-calendar-picker {
            width: 100%;
        }
    }
}

// 1.垂直vertical布局样式
.ant-form-vertical {
    .ant-form-item {
        width: 100%;
        margin-bottom: 16px;
    }

    .ant-form-item-label > label {
        margin-bottom: 8px !important;
    }
}

// 二.textarea
// 1.针对带数字的textarea的样式处理
.ant-input-textarea-show-count {
    border: 1px solid #d9d9d9;

    textarea.ant-input {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    &::after {
        margin-right: 11px;
        margin-bottom: 0 !important;
    }
}

// 三.modal
// 1.去掉model头部颜色
.ant-modal-header {
    background: #fff;
}

// 四.表格
// .ant-table-row-cell-break-word {
//     display: flex;
//     align-items: center;
// }
// table子表格样式背景
tr.ant-table-expanded-row,
tr.ant-table-expanded-row:hover {
    background: #f8f8f9 !important;

    .ant-table-cell-fix-left {
        background: #f8f8f9 !important;
    }

    .ant-table-title + .ant-table-content {
        margin-bottom: 8px !important;
    }
}

// 去掉表头颜色
.ant-table-thead > tr > th {
    background: #fff !important;
    font-weight: bold;
}

.ant-table-hide-scrollbar {
    background: #fff !important;
}

// 行移入背景颜色
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
    background: rgb(244, 246, 249) !important;
}

// 加高横向滚动条
.ant-table-scroll {
    //滚动条
    ::-webkit-scrollbar {
        width: 6px;
        height: 8px !important;
    }
}

//五.tag
.ant-tag-orange {
    background: #fff2e8;
    color: #fa541c;
    border: none;
}

.ant-back-top {
    right: 20px !important;
    bottom: 20px !important;
}

.ant-tabs-nav .ant-tabs-tab-active {
    color: @text-font-color !important;
}

// 六.page-header
.ant-page-header {
    border-bottom: 1px solid rgb(235, 237, 240) !important;
}

// 七.ant-col
// .ant-col {
//     padding: 0 !important;
// }

// 八.a-select
.ant-select-selection-placeholder {
    font-weight: 300;
}

// 九.分页
.ant-pagination {
    &.mini {
        .ant-pagination-prev,
        .ant-pagination-next {
            font-size: 12px;
            color: #c9d1d9;
            border: 1px solid;
        }

        .ant-pagination-prev:hover,
        .ant-pagination-next:hover,
        .ant-pagination-item:focus,
        .ant-pagination-item:hover {
            a {
                color: @primary-color;
            }
        }

        .ant-pagination-prev,
        .ant-pagination-next,
        .ant-pagination-item {
            margin: 0 4px !important;
            background-color: #f4f4f5 !important;
            border: none;
            border-radius: none !important;
            line-height: 24px;

            a {
                display: flex;
                justify-content: center;
                align-items: center;
                // margin-top: 1px;
                color: #606266;
            }

            &:last-child {
                margin-right: 0 !important;
            }
        }

        .ant-pagination-item-active {
            background-color: @primary-color !important;
            border: none;
            border-radius: none !important;

            a {
                color: #fff !important;
            }
        }

        .ant-pagination-options {
            margin-left: 12px;
        }

        .ant-pagination-options-quick-jumper input {
            height: 22px;
            margin: 0 6px;
            line-height: 22px;
            text-align: center;
        }

        .ant-select-arrow {
            color: #cececd;
        }
    }

    &-disabled {
        display: none !important;
    }
}

.ant-table-pagination.ant-pagination {
    margin: 16px 0 0 0 !important;
}

// drop菜单
.ant-dropdown .ant-dropdown-menu,
.ant-dropdown-menu-submenu .ant-dropdown-menu {
    padding: 4px;
    list-style-type: none;
    background-color: #ffffff;
    background-clip: padding-box;
    border-radius: 8px;
    outline: none;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item,
.ant-dropdown-menu-submenu .ant-dropdown-menu .ant-dropdown-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 4px;
}

// sider左侧导航
.ant-layout-content {
    overflow: hidden;
    overflow-y: auto;

    & > .content {
        margin: 12px;
    }
}

// 修改asider样式
.ant-layout-sider-children {
    display: flex;
    flex-direction: column;

    & > ul.ant-menu {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

// 搜索框样式
.ant-input-search {
    .ant-input-affix-wrapper {
        height: 32px;
    }
}

// 修改鼠标移入样式
.ant-menu-light .ant-menu-item:not(.ant-menu-item-selected):hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #30445e !important;
    transition: border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
        padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ant-menu-item-group-title {
    height: auto !important;
}

.ant-menu-light .ant-menu-submenu-title:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #30445e !important;
    transition: border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
        padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ant-menu .ant-menu-item,
.ant-menu .ant-menu-submenu-title {
    border-radius: 8px !important;
    width: calc(100% - 8px) !important;
    margin-inline: 4px !important;
    margin-block: 4px !important;
}

.ant-menu-light .ant-menu-sub.ant-menu-inline,
.ant-menu-light .ant-menu-inline .ant-menu-sub,
.ant-menu-light .ant-menu .ant-menu-sub.ant-menu-inline {
    background-color: #f6f6f6 !important;
}

// dark主题下的子菜单背景色
.ant-menu-dark .ant-menu-sub.ant-menu-inline,
.ant-menu-dark .ant-menu-inline .ant-menu-sub,
.ant-menu-dark .ant-menu .ant-menu-sub.ant-menu-inline {
    background-color: #141414 !important; // 使用暗色主题的标准黑色
}

// 去除右边边框高亮线条
.ant-menu-inline .ant-menu-item:after,
.ant-menu-vertical-left .ant-menu-item:after,
.ant-menu-vertical-right .ant-menu-item:after,
.ant-menu-vertical .ant-menu-item:after {
    border-right: none !important;
}

// 收缩时
.ant-menu-inline,
.ant-menu-vertical,
.ant-menu-vertical-left {
    border-right: none !important;
}

// 收缩时，图标居中
.ant-menu.ant-menu-inline-collapsed > .ant-menu-item,
.ant-menu.ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item,
.ant-menu.ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-submenu > .ant-menu-submenu-title,
.ant-menu.ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title {
    padding: 0 calc(50% - 12px) !important;
}

.ant-layout-sider-collapsed {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
}

//日期选择框
.ant-calendar-picker-input {
    height: 32px;
}

// 拷贝的ant-form源码样式
.has-error .ant-form-explain,
-has-error .ant-form-explain,
.has-error .ant-form-split,
-has-error .ant-form-split {
    color: #ff4d4f;
}

.has-error .ant-input,
-has-error .ant-input,
.has-error .ant-input-affix-wrapper,
-has-error .ant-input-affix-wrapper,
.has-error .ant-input:hover,
-has-error .ant-input:hover,
.has-error .ant-input-affix-wrapper:hover,
-has-error .ant-input-affix-wrapper:hover {
    border-color: #ff4d4f;
}

.has-error .ant-input:focus,
-has-error .ant-input:focus,
.has-error .ant-input-affix-wrapper:focus,
-has-error .ant-input-affix-wrapper:focus,
.has-error .ant-input-focused,
-has-error .ant-input-focused,
.has-error .ant-input-affix-wrapper-focused,
-has-error .ant-input-affix-wrapper-focused {
    border-color: #ff7875;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.has-error .ant-input:not(.has-error .ant-input-disabled),
-has-error .ant-input:not(.has-error .ant-input-disabled),
.has-error .ant-input:not(-has-error .ant-input-disabled),
-has-error .ant-input:not(-has-error .ant-input-disabled) {
    background-color: #fff;
}

.has-error .ant-input-affix-wrapper:not(.has-error .ant-input-affix-wrapper-disabled),
-has-error .ant-input-affix-wrapper:not(.has-error .ant-input-affix-wrapper-disabled),
.has-error .ant-input-affix-wrapper:not(-has-error .ant-input-affix-wrapper-disabled),
-has-error .ant-input-affix-wrapper:not(-has-error .ant-input-affix-wrapper-disabled) {
    background-color: #fff;
}

.has-error .ant-input-affix-wrapper input:focus,
-has-error .ant-input-affix-wrapper input:focus {
    box-shadow: none !important;
}

.has-error .ant-calendar-picker-open .ant-calendar-picker-input,
-has-error .ant-calendar-picker-open .ant-calendar-picker-input {
    border-color: #ff7875;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.has-error .ant-input-prefix,
-has-error .ant-input-prefix {
    color: #ff4d4f;
}

.has-error .ant-input-group-addon,
-has-error .ant-input-group-addon {
    color: #ff4d4f;
    border-color: #ff4d4f;
}

.has-error .has-feedback,
-has-error .has-feedback {
    color: #ff4d4f;
}

.has-error.has-feedback .ant-form-item-children-icon,
-has-error.has-feedback .ant-form-item-children-icon {
    color: #ff4d4f;
    -webkit-animation-name: diffZoomIn2 !important;
    animation-name: diffZoomIn2 !important;
}

.has-error .ant-select:not(.ant-select-borderless) .ant-select-selector,
-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {
    border-color: #ff4d4f !important;
}

.has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector,
-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector,
.has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector,
-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {
    border-color: #ff7875;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.has-error .ant-select.ant-select-auto-complete .ant-input:focus,
-has-error .ant-select.ant-select-auto-complete .ant-input:focus {
    border-color: #ff4d4f;
}

.has-error .ant-input-group-addon .ant-select-selection,
-has-error .ant-input-group-addon .ant-select-selection {
    border-color: transparent;
    box-shadow: none;
}

.has-error .ant-input-number,
-has-error .ant-input-number,
.has-error .ant-time-picker-input,
-has-error .ant-time-picker-input {
    border-color: #ff4d4f;
}

.has-error .ant-input-number-focused,
-has-error .ant-input-number-focused,
.has-error .ant-time-picker-input-focused,
-has-error .ant-time-picker-input-focused,
.has-error .ant-input-number:focus,
-has-error .ant-input-number:focus,
.has-error .ant-time-picker-input:focus,
-has-error .ant-time-picker-input:focus {
    border-color: #ff7875;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.has-error .ant-input-number:not([disabled]):hover,
-has-error .ant-input-number:not([disabled]):hover,
.has-error .ant-time-picker-input:not([disabled]):hover,
-has-error .ant-time-picker-input:not([disabled]):hover {
    border-color: #ff4d4f;
}

.has-error .ant-mention-wrapper .ant-mention-editor,
-has-error .ant-mention-wrapper .ant-mention-editor,
.has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover,
-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {
    border-color: #ff4d4f;
}

.has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,
-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,
.has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus,
-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {
    border-color: #ff7875;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.has-error .ant-cascader-picker:focus .ant-cascader-input,
-has-error .ant-cascader-picker:focus .ant-cascader-input {
    border-color: #ff7875;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.has-error .ant-cascader-picker:hover .ant-cascader-input,
-has-error .ant-cascader-picker:hover .ant-cascader-input {
    border-color: #ff4d4f;
}

.has-error .ant-transfer-list,
-has-error .ant-transfer-list {
    border-color: #ff4d4f;
}
